<?php
//获取所有数据库的名字和数据库的前缀
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");

include "../config.php";


//db记录了所有数据库的表和项等资料。是oa的功能。
$sqlstr="select * from ".$table_Prefix."db  group by  db order by nid ";



$res = mysql_query($sqlstr);

while($row = mysql_fetch_assoc($res)){
	
	//下面的api说加入信息到数据库。先砌好数据库名字和前缀，用于取表取数据。

     $url = 'http://oa.enpingshi.com/api/add_mysql.php?system='.$row['db'].'&pre_name='.$row['tb'];
	//echo $url;
	//echo "<br/>";
	_sock($url);
}


echo "fin with sync log data";

?>

